package com.cn.qgx428.lazydiary.ui.activity


import android.graphics.Color
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import com.cn.qgx428.lazydiary.R
import com.cn.qgx428.lazydiary.Utils.SPUtil
import com.cn.qgx428.lazydiary.ui.fragment.ADFragment
import com.cn.qgx428.lazydiary.ui.fragment.InstallFragment

class GuideActivity : BaseActivity() {
    override fun initUI() {
        hindActionBar()
        setStatuBarTransparent()
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_guide)

        //用户第一次安装APP启动导航页
        //否则启动广告页
        var nowFragment : Fragment
        if (SPUtil.isFirsOpen()){
             nowFragment = InstallFragment()
        } else{
            nowFragment = ADFragment()
        }

        supportFragmentManager.beginTransaction().add(R.id.guide_frame,nowFragment).commit()
    }
}
